function onChangeSize(cls) {
	var $ele = $('#traffic div');
	$ele.removeClass().addClass(cls).children().removeClass().addClass(cls+'_img');
}

function onChangeLocation() {
	// document.form.submit();
	$('#form').submit();
}

function onReload() {
	$('#reload').attr("checked", true);
	// document.form.submit();
	$('#form').submit();
}

$(document).ready(function() {
	// Resize
	// changeSize('small');
	
	// mouseover and mouseout event 
	$('#traffic').mouseover(function(e) {
		$(e.target).closest(".dot").css('background-color', '#E3E9FF');
	}).mouseout(function(e){
		$(e.target).closest(".dot").css('background-color', 'white');
	}); 
	
	$("#traffic img").lazyload({
		placeholder : "/images/grey.gif",
		threshold : 200,
		effect : "fadeIn"
	});
});
